Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix templating LicenseFieldValue on license sync #4468

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

sgalsaleh
Copy link
Member

What this PR does / why we need it:

  • Fixes an issue where the LicenseFieldValue template function did not return the new value when syncing the license.
  • Adds the ability to unit test the rendering capabilities on rewrite.

Which issue(s) this PR fixes:

Fixes SC99587

Special notes for your reviewer:

Steps to reproduce

Does this PR introduce a user-facing change?

* Fixes an issue where the [LicenseFieldValue](/reference/template-functions-license-context#licensefieldvalue) template function did not return the new value when syncing the license.

Does this PR require documentation?

NONE

@sgalsaleh sgalsaleh added type::bug Something isn't working bug::regression labels Feb 23, 2024
@sgalsaleh sgalsaleh requested a review from cbodonnell February 23, 2024 18:24
}

func RenderDir(archiveDir string, a *apptypes.App, downstreams []downstreamtypes.Downstream, registrySettings registrytypes.RegistrySettings, sequence int64) error {
kotsKinds, err := kotsutil.LoadKotsKinds(archiveDir)
func RenderDir(opts types.RenderDirOptions) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the beginning of this function where loading the installation, license, and config values from the upstream directory rather than the kotsKinds directory when creating a new version is what addresses the regression.

@sgalsaleh sgalsaleh merged commit 2405959 into main Feb 23, 2024
104 checks passed
@sgalsaleh sgalsaleh deleted the salah/sc-99587/template-licensefieldvalue-is-broken branch February 23, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug::regression type::bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants